class Cloud extends imageClass{
    constructor(game){
        super(game, "cloud")
        this.game = game
        this.setup()
    }
    setup(){
        this.x = randomBetween(1, 500 - this.w) 
        this.y = - randomBetween(this.h, this.h + 250)
        this.speed = config.cloud_speed
    }
    update (){
        this.y += this.speed
        if (this.y > 600){
            this.y = 0 
            this.x = randomBetween(1, 300)
        }
    }
}